// Created by liusc on 2020/8/5-9:24.
<template>
  <div class="budgetWrap">
    <div class="resource-manage">
      <div class="card-box">
        <div class="card-title">
          <span>申请信息</span>
        </div>
        <el-form ref="add-form" :model="form" :rules="rules" class="form-wrap" label-width="auto">
          <el-row>
            <el-col :span="8">
              <el-form-item label="预算编号" prop="budgetCode">
                <el-col class="in_txt">{{form.applyData.budgetCode}}</el-col>
              </el-form-item>
            </el-col>
            <el-col :span="16">
              <el-form-item label="申请名称" prop="applyName">
                <el-col class="in_txt">{{form.applyData.applyName}}</el-col>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="申请部门">
                <el-col class="in_txt">{{applyDept2}}</el-col>
              </el-form-item>
            </el-col>
            <el-col :span="16">
              <el-form-item label="申请类型">
                <el-col class="in_txt">{{applyType2}}</el-col>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="当前预算额(元)">
                <el-col class="in_txt">{{form.applyData.budgetSum}}</el-col>
              </el-form-item>
            </el-col>
            <el-col :span="16">
              <el-form-item label="调整后预算额(元)">
                <el-col class="in_txt">{{form.applyData.budgetSum2}}</el-col>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="预算变化(元)">
                <el-col class="in_txt">{{form.applyData.changeAmount}}</el-col>
              </el-form-item>
            </el-col>
          </el-row>

          <div class="card-title mb20">
            <span>预算调整</span>
          </div>
          
          <el-table
            :data="form.itemValueList"
            class="dubgetTable"
            row-key="itemId"
            default-expand-all
            :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
            <el-table-column className="weight" header-align="center" prop="itemName" label="科目" width="300">
              <template slot-scope="scope">
                <span style="margin-left: 10px">{{ scope.row.itemName }}</span>
              </template>
            </el-table-column>
            <el-table-column align="center" label="原金额(元)">
              <el-table-column  align="center" prop="itemValue" :label="`${form.applyData.budgetSum}`"/>
            </el-table-column>
            <el-table-column align="center" label="调整后金额(元)">
              <el-table-column  align="center" prop="itemValuePre" :label="`${form.applyData.budgetSum2 || '暂无数据'}`"/>
            </el-table-column>
            <el-table-column align="center" label="变化金额(元)">
              <el-table-column  align="center" prop="itemValue" :label="`${form.applyData.changeAmount || '暂无数据'}`">
                <template slot-scope="scope">
                  {{`${scope.row.changeAmount>0 ? '+':''}${scope.row.changeAmount || 0}`}}
                </template>
              </el-table-column>  
            </el-table-column>
          </el-table>

          <el-form-item label="费用说明" prop="applyData.remarks">
            <el-input v-model="form.applyData.remarks" placeholder="请输入费用说" readonly="readonly" />
          </el-form-item>
        </el-form>

      </div>
    </div>

      <fileUpload ref="fileUpload" type="preview" :busId="fileId" :fileId="fileId2" />

    <div slot="footer" class="footer" style="padding-right: 0px">
      <el-button @click="cancel">返 回</el-button>
    </div>

  </div>
</template>

<script src="./apply_edit_look.js"></script>
<style scoped lang="scss">
@import "./apply_edit_look";
</style>

